package com.yidu.BusinessParament.service.impl;

import com.yidu.BusinessParament.entity.Plate;
import com.yidu.BusinessParament.mapper.PlateMapper;
import com.yidu.BusinessParament.service.PlateService;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author :yimeng
 * @date :2022/12/13  15:05
 * @description:some description
 */
@Service
public class PlateImpl implements PlateService {
    @Resource
    private PlateMapper plateMapper;

    //普通查询所有
    @Override
    public List<Plate> selectPlate() {
        return plateMapper.selectPlate();
    }

    //查询总数
    @Override
    public int selectCountPlate(Plate plate) {
        HashMap map = new HashMap();
        map.put("count",plate);
        return plateMapper.selectCountPlate(map);
    }

    //添加数据
    @Override
    public int insertPlate(Plate plate) {
        return plateMapper.insertPlate(plate);
    }

    //删除数据
    @Override
    public int deletePlate(String plateId) {
        return plateMapper.deletePlate(plateId);
    }

    //修改数据
    @Override
    public int updatePlate(Plate plate) {
        return plateMapper.updatePlate(plate);
    }


}
